<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FACOPOLY:  Fichier source de /home/etu/g/p0804564/facopoly/src/DE.c</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">FACOPOLY
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li><a href="dirs.html"><span>Répertoires</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_d_e_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">DE.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_d_e_8c.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<a class="code" href="_d_e_8h.html" title="facopoly  Permet de créer les dés de jeu">DE.h</a>&quot;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 
<a name="l00009"></a><a class="code" href="_d_e_8h.html#a957d0db869716ba32b741d8e3ff263c8">00009</a> <a class="code" href="struct_d_e.html" title="Module des dés de jeu.">DE</a>* <a class="code" href="_d_e_8c.html#a957d0db869716ba32b741d8e3ff263c8" title="Création des dés.">deCreer_De</a>()
<a name="l00010"></a>00010 {
<a name="l00011"></a>00011     <a class="code" href="struct_d_e.html" title="Module des dés de jeu.">DE</a>* d=(<a class="code" href="struct_d_e.html" title="Module des dés de jeu.">DE</a>*) malloc(<span class="keyword">sizeof</span>(<a class="code" href="struct_d_e.html" title="Module des dés de jeu.">DE</a>));
<a name="l00012"></a>00012     d-&gt;<a class="code" href="struct_d_e.html#a9d5027a2fcc2dd94397641b8dff26e9c">de1</a>=0;
<a name="l00013"></a>00013     d-&gt;<a class="code" href="struct_d_e.html#a99ff079b9da0e3cf4c4a324b607e558e">de2</a>=0;
<a name="l00014"></a>00014     <span class="keywordflow">return</span> d;
<a name="l00015"></a>00015 }
<a name="l00016"></a>00016 
<a name="l00017"></a><a class="code" href="_d_e_8h.html#a0df7f1a0e0decb72b48d2b99715fbb1e">00017</a> <span class="keywordtype">void</span> <a class="code" href="_d_e_8c.html#a0df7f1a0e0decb72b48d2b99715fbb1e" title="Tirage Aléatoire des dés.">deTirage_Alea</a>(<a class="code" href="struct_d_e.html" title="Module des dés de jeu.">DE</a>* d)
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019     srand(time(NULL));
<a name="l00020"></a>00020     d-&gt;<a class="code" href="struct_d_e.html#a9d5027a2fcc2dd94397641b8dff26e9c">de1</a> = rand() % 6 + 1;
<a name="l00021"></a>00021     d-&gt;<a class="code" href="struct_d_e.html#a99ff079b9da0e3cf4c4a324b607e558e">de2</a> = rand() % 6 + 1;
<a name="l00022"></a>00022 }
<a name="l00023"></a>00023 
<a name="l00024"></a><a class="code" href="_d_e_8h.html#a33d159d212957cd14557cb66db67798a">00024</a> <span class="keywordtype">void</span> <a class="code" href="_d_e_8c.html#a33d159d212957cd14557cb66db67798a" title="Libere l&#39;espace alloué pour la struct DE.">deLibere_De</a>(<a class="code" href="struct_d_e.html" title="Module des dés de jeu.">DE</a>* d)
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026     free(d);
<a name="l00027"></a>00027 }
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_d_e_8c.html">DE.c</a>      </li>

    <li class="footer">Généré le Mardi Mai 14 2013 08:10:34 pour FACOPOLY par
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
